class CommentsController < ApplicationController
  def new
    
  end
  
  def create
    @event = Event.find(params[:comment]['event_id'])
    @comment = Comment.new(params[:comment])
    @comment.user_id = current_user.id
    @comment.save
    
    respond_to do |format|
      format.html {
        redirect_to event_url(@event)
      }
      format.js
    end
  end
  
  def show
    
  end
  
  def destroy
    
  end
  
  
end
